package com.second.hand.trading.server.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

public class IntergralModel implements Serializable {
    public static final Integer TEN_TYPE = 1; //10
    public static final Integer ONE_TYPE = 2; //100
    private Long id;
    private String phone;
    private Date updateDate;
    private Long amount;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Long getAmount() {
        return amount;
    }

    public void setAmount(Long amount) {
        this.amount = amount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        IntergralModel that = (IntergralModel) o;
        return Objects.equals(id, that.id) && Objects.equals(phone, that.phone) && Objects.equals(updateDate, that.updateDate) && Objects.equals(amount, that.amount);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, phone, updateDate, amount);
    }

    @Override
    public String toString() {
        return "IntergralModel{" +
                "id=" + id +
                ", phone='" + phone + '\'' +
                ", updateDate=" + updateDate +
                ", amount=" + amount +
                '}';
    }
}
